all: ex1_server ex1_client

clean:
	rm ex1_server ex1_server.o ex1_client ex1_client.o dequeue.o my_malloc.o mutex.o

ex1_server: ex1_server.o dequeue.o my_malloc.o mutex.o
	g++ -o ex1_server ex1_server.o dequeue.o my_malloc.o mutex.o -lpthread -ltbb

ex1_server.o: ex1_server.cpp
	g++ -Wall -lpthread -ltbb -c ex1_server.cpp

dequeue.o: mutex.o
	g++ -Wall -lpthread -ltbb -c Libs/dequeue.cpp

my_malloc.o:
	g++ -Wall -lpthread -ltbb -c Libs/my_malloc.cpp

ex1_client: ex1_client.o
	g++ -o ex1_client ex1_client.o -lpthread

ex1_client.o: ex1_client.cpp
	g++ -Wall -lpthread -ltbb -c ex1_client.cpp

mutex.o:
	g++ -Wall -lpthread -ltbb -c Libs/mutex.cpp

